Remove ticket id from the message.

@param msg the message
@return the modified message with tgt id removed
434356
public static String sanitize(final String msg) {
        var modifiedMessage = msg;
        if (StringUtils.isNotBlank(msg) && !Boolean.getBoolean("CAS_TICKET_ID_SANITIZE_SKIP")) {
            val matcher = TICKET_ID_PATTERN.matcher(msg);
            while (matcher.find()) {
                val match = matcher.group();
                val group = matcher.group(1);
                val length = group.length();
                var replaceLength = length - VISIBLE_TAIL_LENGTH - (HOST_NAME_LENGTH + 1);
                if (replaceLength <= 0) {
                    replaceLength = length;
                }
                val newId = match.replace(group.substring(0, replaceLength), "*".repeat(OBFUSCATION_LENGTH));
                modifiedMessage = modifiedMessage.replaceAll(match, newId);
            }
        }
        return modifiedMessage;
    }
1133052
@Override
	public void removeByLtS(Date sentDate) {
		for (CommerceNotificationQueueEntry commerceNotificationQueueEntry : findByLtS(
				sentDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceNotificationQueueEntry);
		}
	}
669990
@Override
	public void removeByG_T_E(long groupId, String type, boolean enabled) {
		for (CommerceNotificationTemplate commerceNotificationTemplate : findByG_T_E(
				groupId, type, enabled, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
				null)) {
			remove(commerceNotificationTemplate);
		}
	}
576438
@SuppressWarnings("unchecked")
    public static <T> T retain(T msg) {
        if (msg instanceof ReferenceCounted) {
            return (T) ((ReferenceCounted) msg).retain();
        }
        return msg;
    }
1234406
@Override
	public void removeByG_T(long groupId, int type) {
		for (CPMeasurementUnit cpMeasurementUnit : findByG_T(groupId, type,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(cpMeasurementUnit);
		}
	}
1341278
public void removeMessage(String messageId) {
        Collection<ValidationMessage<Origin>> toRemove = new ArrayList<ValidationMessage<Origin>>();

        for (ValidationMessage<Origin> message : messages) {
            if (messageId.equals(message.getMessageKey())) {
                toRemove.add(message);
            }
        }
        messages.removeAll(toRemove);
    }
926002
@SuppressWarnings("unchecked")
    public static <T> T touch(T msg) {
        if (msg instanceof ReferenceCounted) {
            return (T) ((ReferenceCounted) msg).touch();
        }
        return msg;
    }
837608
def delete_message(self, chat_id, message_id):
        
        return apihelper.delete_message(self.token, chat_id, message_id)
777222
public String getMessageId() {
        Object messageId = getHeader(JmsMessageHeaders.MESSAGE_ID);

        if (messageId != null) {
            return messageId.toString();
        }

        return null;
    }
94764
public Collection<Message> getMatchingMessages(final short id, boolean remove) {
        return map((msg, batch) -> {
            if(msg != null && msg.getHeader(id) != null) {
                if(remove)
                    batch.remove(msg);
                return msg;
            }
            return null;
        });
    }
1100595
public static <T> Validation<T> notNull(String msg) {
        return SimpleValidation.from(Objects::nonNull, msg);
    }
408024
async def deleteMessage(self, msg_identifier):
        
        p = _strip(locals(), more=['msg_identifier'])
        p.update(_dismantle_message_identifier(msg_identifier))
        return await self._api_request('deleteMessage', _rectify(p))
1126966
def delete_message(self, message, callback=None):
        
        return self.connection.delete_message(self, message, callback=callback)
1088265
public ArrayList<OvhMessage> tickets_ticketId_messages_GET(Long ticketId) throws IOException {
		String qPath = "/support/tickets/{ticketId}/messages";
		StringBuilder sb = path(qPath, ticketId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t1);
	}
1243311
def delete_message(self, message):
        

        message_id = message.object_id if isinstance(message,
                                                     Message) else message

        if message_id is None:
            raise RuntimeError('Provide a valid Message or a message id')

        url = self.build_url(
            self._endpoints.get('message').format(id=message_id))

        response = self.con.delete(url)

        return bool(response)
850362
synchronized boolean deleteMessageForId(String messageId, String userId){
        if(messageId == null || userId == null) return false;

        final String tName = Table.INBOX_MESSAGES.getName();

        try {
            final SQLiteDatabase db = dbHelper.getWritableDatabase();
            db.delete(tName, _ID + " = ? AND " + USER_ID + " = ?", new String[]{messageId,userId});
            return true;
        } catch (final SQLiteException e) {
            getConfigLogger().verbose("Error removing stale records from " + tName, e);
            return false;
        } finally {
            dbHelper.close();
        }
    }
1315819
@Override
    public boolean requeueSilent(IQueueMessage<ID, DATA> _msg) throws QueueException.QueueIsFull {
        IQueueMessage<ID, DATA> msg = _msg.clone();
        putToQueue(msg);
        if (!isEphemeralDisabled()) {
            ephemeralStorage.remove(msg.getId());
        }
        return true;
    }